libxl/gentest.py: test JSON parser
authorWei Liu <wei.liu2@citrix.com>
Wed, 9 Jul 2014 09:45:27 +0000 (10:45 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Jul 2014 12:06:55 +0000 (13:06 +0100)
commitddfcbf58912978aa7bd845b5e860d23d408acd46
tree152b21733cd1d48ed8a9d4219781cafd88dd8036
parenta4e5aea5d3c7c0abecda8fad8040eb63b5e82fa2
libxl/gentest.py: test JSON parser

The test is done in following steps:

1. initialise libxl_FOO struct
2. generate JSON string A for libxl_FOO struct FOO1
3. convert JSON string A to libxl_FOO struct FOO2
4. generate JSON string B for libxl_FOO struct FOO2
5. compare A and B

If A and B are identical then we are good.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/gentest.py